#include <opencv4/opencv2/opencv.hpp>
#include <iostream>
#include <fstream>
#include"Buff.h"
#include"ArmorDector.h"
#include"offsetSolve.h"
using namespace std;
using namespace cv;

class Operation
{
public:
    Operation(){}
    virtual ~Operation() {};
    void setImg(Mat src);
    virtual Point2f shootCenter()  = 0;
protected:
    Mat _src;
};

class ArmorOperation : public Operation
{
public:
    ArmorOperation();
    virtual ~ArmorOperation() override ;
    bool armCenter();
    int armorType();
    virtual Point2f shootCenter() override;
private:
    ArmorDetector *_arm;
    Point2f _center;
};

class BuffOperation : public Operation
{
public:
    BuffOperation();
    virtual ~BuffOperation() override ;
    int armorType();
    virtual Point2f shootCenter() override;

private:
    BuffDetector  *_buff;
};

class NoTaskOperation : public Operation
{
public:
    NoTaskOperation(){}
    virtual ~NoTaskOperation() override {}
    virtual Point2f shootCenter() override;
private:
};

class TaskFactory
{
public:
    TaskFactory(){}
    virtual ~TaskFactory() {};
    virtual Operation *creatTask() = 0;
private:
};

class ArmorShootFactory : public TaskFactory
{
public:
    ArmorShootFactory(){}
    virtual ~ArmorShootFactory() override {}
    virtual Operation *creatTask() override;
private:
};